<?php
require_once "init.php";

$isRegistered = ServiceFactory::getUserService()->checkIfRegistered($_uid);

if (!$isRegistered) {

    include "view/register.php";

} else {

    $_page = $_GET['_page'];
    $_action = $_GET['_action'];

    if (!empty($_action)) {

        include "action/$_action.php";

    } else {

        if (empty($_page)) {

            include "view/compose.php";

        } else {

            include "view/$_page.php";

        }

    }

}
?>